Skip to content

Skip before_lt only when it's None#21

Merged
nessshon merged 1 commit intonessshon:mainfrom
Chipe1:before_lt_0_ignored
Jul 17, 2024
Merged

Skip before_lt only when it's None#21
nessshon merged 1 commit intonessshon:mainfrom
Chipe1:before_lt_0_ignored

Conversation

@Chipe1
Copy link
Copy Markdown
Contributor

@Chipe1 Chipe1 commented Jul 16, 2024

Cursor based pagination relies on before_lt and at the last page the value of the cursor next_from(eg. accounts.get_events()) is 0 which was getting skipped because if 0: is falsy.
Added is not None check to all before_lt and after_lt conditional checks, similar to 2e44876

@nessshon nessshon merged commit 4af1944 into nessshon:main Jul 17, 2024
@nessshon
Copy link
Copy Markdown
Owner

@Chipe1, Thanks for your contributions!

@Chipe1 Chipe1 deleted the before_lt_0_ignored branch July 17, 2024 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants